Field of the Invention
The invention lies in the data processing field. More specifically, the invention relates to a method of controlling a data processing system for producing an object program by linking a plurality of program modules.
When an object program is produced which is formulated in a relatively high-level programming language, for example COBOL, C, C++, Fortran, and the like, it is normal, first of all, to produce individual source text modules, for example procedures and functions, which are translated independently of one another by means of a high-level language translator, also called a compiler, into the machine language. Machine language are lowest level instructions that can be directly "understood" by the computer. The program modules produced in this way are linked to an object program by means of a linker.
When one program module calls another, it is necessary to ensure that the two program modules involved in the call satisfy standard linking declarations, in order to ensure error-free parameter transfer between the calling program module and the called program module. Such linking declarations are, for example, conventions relating to register assignments, data formats etc.
During the translation process, high-level language translators for relatively high-level programming languages automatically produce a standard declaration statement of linking declarations, which is applicable to all program modules. The program developer therefore does not need to be concerned about the linking declaration.
However, the program developer needs to observe these linking declarations as soon as he wishes to link program modules to the object program which have not been produced using the specified high-level language translator, such as program modules which are formulated in an assembler language, referred to for short as assembler modules in the following text. For assembler programming, the linking declarations are programmed by the program developer himself, so that the linking declarations are inseparably included in the assembler module. Such program modules, which cannot be produced by the specified high-level language translator and are inseparably linked to a declaration statement are referred to in the following text as external program modules. The modules produced by the specified high-level language translator, on the other hand, are referred to as internal program modules.
The declaration statement for module links which, at the time when the object program is first produced, has not only been produced by the specified high-level language translator for internal program modules but has also been taken into account in an appropriate manner in external program modules, is referred to as the original declaration statement in the following text.
If the intention is to transfer the object program to a different computer system then, as a rule, it is expedient to use a new declaration statement, which is particularly well matched to the hardware of the new computer system, for module links, in order to avoid seriously adversely affecting the processing speed of the new computer system. This new declaration statement is referred to in the following text as an efficient declaration statement. The efficient declaration statement also has to be used in this case when commercially available collections of program routines for the new computer system--referred to as standard modules in the following text--are intended to be included which, as a rule, are available only for the efficient declaration statement, which is particularly well matched to the hardware. For these reasons, it is desirable to convert the linking statements for the object program to the efficient declaration statement, as far as possible.
The specified high-level language translator could optimally match the internal program modules produced to the new hardware by retranslation of all the source text modules using the efficient declaration statement. However, there would then no longer be any assurance that the internal program modules could be linked to the external program modules, which are rigidly coupled to the original declaration statement.
In order to solve this problem, a method is known in which matching routines are used in order to compensate for the mutually different linking declarations of program modules. In order to match the declaration statements for the calling program module and called program module to one another, the program developer has to produce such a matching routine for all the relevant program modules when using the known method. In this case, it is necessary to know not only the differences in the linking declarations, but also the number and type of parameters transferred during each call, since these are defined individually for each program module. The prior art method is therefore highly complex, and makes portability of the object program to a new computer system difficult.